#ifndef _STDTCP_H_
#define _STDTCP_H_

#include <cstdbool>
#include <stddef.h>

class StdTcpServer
{
public:
    StdTcpServer(const char *ip,unsigned short port);
    int Accept();
    bool TcpServerRecv(int clientSock,void *ptr,size_t size);
    bool TcpServerSend(int clientSock,void *ptr,size_t size);
    ~StdTcpServer();
private:
    int sock;
};
typedef class StdTcpServer TcpS;



class StdTcpClient
{
public:
    StdTcpClient(const char *ServerIP,unsigned short ServerPort);
    bool TcpClientRecv(void *ptr,size_t size);
    bool TcpClientSend(void *ptr,size_t size);
    ~StdTcpClient();
private:
    int sock;
};
typedef class StdTcpClient TcpC;

#endif